<template>
    <div>
        <dictionary-add
            v-if="dialogAdd"
            :parentOptions="parentOptions"
            @cancel="cancel"
            @listSearch="listSearch"
        >
        </dictionary-add>
        <dictionary-edit
            v-if="dialogEdit"
            :singeOption="singeOption"
            @cancel="cancel"
            @listSearch="listSearch"
        >
        </dictionary-edit>
    </div>
</template>

<script>
    import dictionaryAdd from "./dialogComponents/dictionaryAdd"
    import dictionaryEdit from "./dialogComponents/dictionaryEdit"

    export default {
        components:{
            dictionaryAdd,
            dictionaryEdit
        },
        props: [
            "dialogAdd",
            "dialogEdit",
            "parentOptions",
            "singeOption"
        ],
        methods: {
            cancel(param){
                this.$emit('cancel',param);
            },
            listSearch(){
                this.$emit('listSearch');
            },
        },
    }
</script>